# Copyright 2021 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("//bazel:psi.bzl", "psi_cc_binary", "psi_cc_library", "psi_cc_test")

package(default_visibility = ["//visibility:public"])

psi_cc_library(
    name = "dp_psi",
    srcs = [
        "dp_psi.cc",
        "dp_psi_utils.cc",
    ],
    hdrs = [
        "dp_psi.h",
        "dp_psi_utils.h",
    ],
    deps = [
        "//psi/psi/core:ecdh_3pc_psi",
        "//psi/psi/core:ecdh_psi",
        "//psi/psi/cryptor:cryptor_selector",
        "//psi/psi/utils:batch_provider",
        "//psi/psi/utils:ec_point_store",
        "//psi/psi/utils:serialize",
        "@com_google_absl//absl/strings",
        "@yacl//yacl/base:exception",
        "@yacl//yacl/crypto/utils:rand",
        "@yacl//yacl/link",
        "@yacl//yacl/utils:parallel",
    ],
)

psi_cc_test(
    name = "dp_psi_test",
    srcs = ["dp_psi_test.cc"],
    deps = [
        ":dp_psi",
        "@com_google_absl//absl/container:flat_hash_set",
    ],
)

psi_cc_binary(
    name = "dp_psi_bench",
    srcs = ["dp_psi_bench.cc"],
    deps = [
        ":dp_psi",
        "@com_github_google_benchmark//:benchmark_main",
        "@com_google_absl//absl/container:flat_hash_set",
    ],
)

psi_cc_binary(
    name = "dp_psi_payload_bench",
    srcs = ["dp_psi_payload_bench.cc"],
    deps = [
        ":dp_psi",
        "@com_github_google_benchmark//:benchmark_main",
        "@com_google_absl//absl/container:flat_hash_set",
    ],
)
